const mongoose = require("mongoose");

const schema = new mongoose.Schema({
  username: {
    type: String,
    required: true,
  },
  password: {
    type: String,
    required: true,
  },
  phone: String,
  email: String,
  nickname: String,
  avatar: String,
  age: Number,
});

// 创建 Model 并暴露出去
module.exports = mongoose.model("User", schema);
